<template>
  <div>
    <el-row class="tac">
      <el-col :span="12">
        <el-menu default-active="2" active-text-color="#409EFF" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :router="true">

            <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==19">
          <el-menu-item index="/CompanyIndexView">     <!-- -->
            <i class="el-icon-menu"></i>
            <span slot99O99IUII8="title">{{ findmenu.title }}</span>
          </el-menu-item>
            </span></span></span>

          <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==20">
          <el-menu-item index="/CalendarView">
            <i class="el-icon-date"></i>
            <span slot="title">{{ findmenu.title }}</span>
          </el-menu-item>
             </span></span></span>

          <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==21">
          <el-submenu index="1">
            <template #title>
              <i class="el-icon-location"></i>
              <span>{{ findmenu.title }}</span>
            </template>

              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==23">
            <el-submenu index="1-4">
              <template #title>{{ findmenu.title }}</template>

              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==27">
              <el-submenu index="1-4-1">
                <template #title>{{ findmenu.title }}</template>


                <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==34">
                <el-menu-item index="/AddDepartmentView">{{ findmenu.title }}</el-menu-item>
                </span></span></span>

                <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==35">
                <el-menu-item index="/EditDepartmentView">{{ findmenu.title }}</el-menu-item>
                </span></span></span>


              </el-submenu>
                </span></span></span>

                <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==28">
              <el-submenu index="1-5">
                <template #title>{{ findmenu.title }}</template>

                <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==36">
                <el-menu-item index="/ApplyView">{{ findmenu.title }}</el-menu-item>
                </span></span></span>

                <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==37">
                <el-menu-item index="/DistributionView">{{ findmenu.title }}</el-menu-item>
                </span></span></span>

              </el-submenu>
              </span></span></span>


              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==29">
              <el-submenu index="1-6">
                <template #title>{{ findmenu.title }}</template>

                 <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==38">
                <el-menu-item index="/EditPositionView">{{ findmenu.title }}</el-menu-item>
                   </span></span></span>

              </el-submenu>
                </span></span></span>

              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==30">
              <el-menu-item index="/MaintainView">{{ findmenu.title }}</el-menu-item>
              </span></span></span>

            </el-submenu>
                 </span></span></span>


             <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==24">
            <el-submenu index="1-5">
              <template #title>{{ findmenu.title }}</template>


              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==31">
              <el-menu-item index="/ReleaseProjectView">{{ findmenu.title }}</el-menu-item>
              </span></span></span>

              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==32">
              <el-menu-item index="/EditProjectView">{{ findmenu.title }}</el-menu-item>
              </span></span></span>

              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==33">
              <el-menu-item index="/projectTableView">{{ findmenu.title }}</el-menu-item>
              </span></span></span>


            </el-submenu>
                 </span></span></span>

          </el-submenu>
              </span></span></span>

          <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==22">
          <el-submenu index="1-6">
            <template #title>
              <i class="el-icon-setting"></i>
              <span>{{ findmenu.title }}</span>
            </template>
            <el-menu-item-group>

              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==25">
              <el-menu-item index="ChangeInfoView">{{ findmenu.title }}</el-menu-item>

               </span></span></span>
          <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==26">
              <el-menu-item index="1-2">{{ findmenu.title }}</el-menu-item>
               </span></span></span>

            </el-menu-item-group>
          </el-submenu>
          </span></span></span>
        </el-menu>
      </el-col>
    </el-row>

  </div>
</template>

<style>
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 199px;
  min-height: 600px;
  line-height: 50%;
}

.wm {
  height: 40px;
}
</style>

<script>
import instance from "@/utlis/request";

export default {
  name: 'CompanyMenu',
  data() {
    return {
      openeds: ['1'],
      isCollapse: true,
      findmenus:{},
    };
  },
  created:function (){
    this.initDate();
  },
  methods:{
    initDate:function (){
      instance.get("/Manage/UserMenus").then(res=>{
        this.findmenus=res.data.data
        console.log(res)
      })
    }
  }

}
</script>
